<ul class="lang"><?
	foreach($DATA['langs'] as $lid => $l) {
		if ($lid == $CONTEXT['lang']) {
			?><li class="<?=$lid?>-active"><span><?=$l['assoc']?></span></li><?
		} else {
			if (!($l['attr'] & LL_ACTIVE)) continue;
			
			if ($lid == LANG_DEF) {
				$u = _transformUrl($CURRENT->url, array('replace_level' => '0:'));	// remove lang prefix
			} else if ($CONTEXT['lang'] == LANG_DEF) {
				$u = "/$lid".$CONTEXT['rawUrl'];	// add lang prefix
			} else {
				$u = _transformUrl($CURRENT->url, array('replace_level' => "0:$lid"));	// replace lang prefix
			}
			
			?><li class="<?=$lid?>"><a href="<?=$u?>" title="<?=h($l['assoc'])?>"><?=$l['assoc']?></a></li><?
		}
	}
?></ul>
